package event_impl

import (
	"go_server/game_server/event_manager/event_data"
	"go_server/zinx/ziface"
)

type AddHeroEvent struct {
	event_data.AbsEventData
	HeroSerid int32 //英雄服务器id
}

func NewAddHeroEvent(conn ziface.IConnection, heroserid int32) *AddHeroEvent {
	event := new(AddHeroEvent)
	event.EventType = event_data.AddHeroEvent
	event.HeroSerid = heroserid
	event.RoleConn = conn
	return event
}

type UpLevelHeroEvent struct {
	event_data.AbsEventData
	HeroSerid int32 //英雄服务器id
	BeforeLv  int32 //升级前等级
	AfterLv   int32 //升级后等
}

func NewUpLevelHeroEvent(conn ziface.IConnection, heroserid int32, beforelv int32, afterlv int32) *UpLevelHeroEvent {
	event := new(UpLevelHeroEvent)
	event.EventType = event_data.UpLevelHeroEvent
	event.RoleConn = conn

	event.HeroSerid = heroserid
	event.BeforeLv = beforelv
	event.AfterLv = afterlv
	return event
}

type UpStarHeroEvent struct {
	event_data.AbsEventData
	HeroSerid  int32 //英雄服务器id
	BeforeStar int32 //升级前星级
	AfterStar  int32 //升级后星级
}

func NewUpStarHeroEvent(conn ziface.IConnection, heroserid int32, beforestar int32, afterstar int32) *UpStarHeroEvent {
	event := new(UpStarHeroEvent)
	event.EventType = event_data.UpStarHeroEvent
	event.RoleConn = conn

	event.HeroSerid = heroserid
	event.BeforeStar = beforestar
	event.AfterStar = afterstar

	return event
}
